# !/usr/bin/python
# _*_ coding: utf-8 _*_
# @Time : 2021/5/25 1:51 下午
# @Author : liujun
# @File : result_code.py
# @desc : 返回结果状态码
from enum import Enum


class ResultCode(Enum):
    SUCCESS = (1, '成功')
    FAILURE = (0, '失败')
    USER_NOT_EXIST = (0, '账号不存在')
    USER_ACCOUNT_FORBIDDEN = (0, '该用户已禁用，请联系管理员')
    USER_LOGIN_ERROR = (0, '密码错误')
    USER_HAS_EXISTED = (0, '用户已存在')
    AUTHENTICATION_ERROR = (0, '无访问权限')
    USER_NOT_LOGGED_IN = (-1, '用户未登录')
    DATA_NONE = (0, '数据未找到')
    DATA_ALREADY_EXISTED = (0, '数据已存在')
    VALIDATION_ERROR = (0, '参数验证错误')
    REQUEST_VALIDATION_ERROR = (0, '请求参数错误')
    SYSTEM_INNER_ERROR = (0, '内部错误，请稍后重试')
    TOKEN_AUTH_ERROR = (-1, '用户身份验证失败')
    TOKEN_EXPIRED = (-1, '用户身份过期')
